﻿namespace HRM.CORE
{
    using DevExpress.Data;
    using DevExpress.Utils;
    using DevExpress.XtraBars;
    using DevExpress.XtraBars.Docking;
    using DevExpress.XtraEditors;
    using DevExpress.XtraEditors.Controls;
    using DevExpress.XtraEditors.Repository;
    using DevExpress.XtraGrid;
    using DevExpress.XtraGrid.Columns;
    using DevExpress.XtraGrid.Views.Base;
    using DevExpress.XtraGrid.Views.Grid;
    using Microsoft.VisualBasic;
    using APP.HELPER;
    using Common.Class; using APP.HELPER.Utils.Language; using Security.Security; using Dictionary.ERP;
    using Common.Report;
    using Dictionary;
    using HRM.CORE;
    using HRM.CORE.REPORT;
    
    using System; using Extra.ERP;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Runtime.CompilerServices;
    using System.Windows.Forms; using Common;
    using Extra.ERP;
    using APP.HELPER.Utils;
    using Common;

    public class xucTimekeeping : Common.xucBase
    {
        private Bar bar1;
        private BarDockControl barDockControlBottom;
        private BarDockControl barDockControlLeft;
        private BarDockControl barDockControlRight;
        private BarDockControl barDockControlTop;
        private BarManager barManager1;
        private BarEditItem bbeMonth;
        private BarEditItem bbeTimekeepingName;
        private BarEditItem bbeYear;
        private BarButtonItem bbiClose;
        private BarButtonItem bbiExport;
        private BarButtonItem bbiFinish;
        private BarButtonItem bbiLock;
        private BarButtonItem bbiOpen;
        private BarButtonItem bbiPrint;
        private BarButtonItem bbiReload;
        private BarButtonItem bbiSave;
        private BarButtonItem bbiSendMail;
        private BarButtonItem bbiTimekeepingBreak;
        private BarButtonItem bbiTimekeepingExtra;
        private BarButtonItem bbiTimekeepingPrivate;
        private Common.Class.clsAllOption clsAllOption = new Common.Class.clsAllOption();
        private GridColumn colDate;
        private GridColumn colDayHour;
        private GridColumn colDescription;
        private GridColumn colEarlyMinute;
        private GridColumn colHour;
        private GridColumn colIsOverTime;
        private GridColumn colIsWork;
        private GridColumn colLateMinute;
        private GridColumn colNightHour;
        private GridColumn colPrivateHour;
        private GridColumn colShiftCode;
        private GridColumn colShiftName;
        private GridColumn colSorted;
        private GridColumn colSymbol;
        private GridColumn colTimeIn;
        private GridColumn colTimeOut;
        private IContainer components = null;
        private DockManager dockManager1;
        private ControlContainer dockPanel1_Container;
        private DockPanel dpFooter;
        private FlowLayoutPanel flowLayoutPanel1;
        private FlowLayoutPanel flowLayoutPanel2;
        private GridView gbList;
        private GridControl gcList;
        private GridColumn gridColumn1;
        private GridColumn gridColumn2;
        private AutoHideContainer hideContainerBottom;
        public DevExpress.Utils.ImageCollection imageCollection2;
        private PictureEdit imgPhoto;
        private HRM_EMPLOYEE l_Employee = new HRM_EMPLOYEE();
        private DIC_SHIFT l_Shift;
        private HRM_TIMEKEEPER l_TimeKeeper = new HRM_TIMEKEEPER();
        private HRM_TIMEKEEPER_SHIFT l_TimeKeeperShift = new HRM_TIMEKEEPER_SHIFT();
        private LabelControl labelControl15;
        private LabelControl labelControl16;
        private LabelControl labelControl17;
        private LabelControl labelControl20;
        private LabelControl lbEarlyMinute;
        private LabelControl lbLateMinute;
        private Label lblState;
        private LabelControl lbOverTimeHour;
        private LabelControl lbTotalHour;
        private string m_Code = MyLogin.Code;
        private System.DateTime m_Date = System.DateTime.Now;
        private System.DateTime m_DateOld = System.DateTime.Now;
        private double m_DayHour = 0.0;
        private string m_Description = "";
        private int m_EarlyMinute = 0;
        private int m_EarlyMinuteOld = 0;
        private string m_EmployeeCode = "";
        private double m_Hour = 0.0;
        private double m_HourOld = 0.0;
        private bool m_IsFinish = false;
        private bool m_IsLock = false;
        private bool m_IsOverTime = false;
        private bool m_IsOverTimeOld = false;
        private bool m_IsWork = false;
        private int m_LateMinute = 0;
        private int m_LateMinuteOld = 0;
        private int m_Level = MyLogin.Level;
        private int m_Month = 0;
        private double m_NightHour = 0.0;
        private double m_PrivateHour = 0.0;
        private string m_ShiftCode = "";
        private string m_ShiftCodeOld = "";
        private int m_Sorted = 0;
        private string m_Symbol = "";
        private string m_SymbolOld = "";
        private System.DateTime m_TimeIn = System.DateTime.Now;
        private System.DateTime m_TimeInOld = System.DateTime.Now;
        private Guid m_TimeKeeperTableListID = Guid.Empty;
        private System.DateTime m_TimeOut = System.DateTime.Now;
        private System.DateTime m_TimeOutOld = System.DateTime.Now;
        private int m_Year = 0;
        private PanelControl panelControl1;
        private PanelControl pnInformation;
        private PopupMenu popupMenu1;
        private PictureBox ptFail;
        private PictureBox ptFinish;
        private PictureBox ptLock;
        private RepositoryItemCalcEdit repEarlyMinute;
        private RepositoryItemCalcEdit repLateMinute;
        private RepositoryItemTimeEdit repMonth;
        private RepositoryItemTextEdit repositoryItemTextEdit2;
        private RepositoryItemGridLookUpEdit repSymbol;
        private GridView repSymbolView;
        private RepositoryItemTimeEdit repTimeIn;
        private RepositoryItemTimeEdit repTimeOut;
        private RepositoryItemTimeEdit repYear;
        private SplitContainerControl splitContainerControl1;
        private SplitContainerControl splitContainerControl2;
        private LabelControl txtEmployeeCode;
        private LabelControl txtEmployeeName;
        private xucListEmployee xucListEmployee1;
        private xucOrganization xucOrganization1;

        public event ClosedHandler Closed;

        public event TimekeeperTableInsertedHandler TimekeeperTableInserted;

        public event UnShiftDataHandler UnShiftData;

        public xucTimekeeping()
        {
            this.InitializeComponent();
            base.RestoreLayout(this.gbList, this);
            this.InitMultiLanguages();
            base.Load += new EventHandler(this.xucTimekeeping_Load);
            this.barManager1.SetPopupContextMenu(this.gcList, this.popupMenu1);
        }

        private void bbiClose_ItemClick(object sender, ItemClickEventArgs e)
        {
            this.RaiseClosedHandler();
        }

        private void bbiExport_ItemClick(object sender, ItemClickEventArgs e)
        {
            base._exportView = this.gbList;
            SYS_LOG.Insert("Bảng Chấm C\x00f4ng V\x00e0o Ra", "Xuất");
            base.Export();
        }

        private void bbiFinish_ItemClick(object sender, ItemClickEventArgs e)
        {
            if (!ClsOption.System2.IsQuestion || (XtraMessageBox.Show("Bạn c\x00f3 chắc l\x00e0 muốn thực hiện t\x00e1c vụ n\x00e0y kh\x00f4ng?" + Environment.NewLine + " T\x00e1c vụ n\x00e0y được hiểu l\x00e0 bạn đ\x00e3 ho\x00e0n th\x00e0nh bảng chấm c\x00f4ng của th\x00e1ng n\x00e0y!", "Th\x00f4ng b\x00e1o", MessageBoxButtons.YesNo, MessageBoxIcon.Question) != DialogResult.No))
            {
                HRM_TIMEKEEPER_TABLELIST hrm_timekeeper_tablelist = new HRM_TIMEKEEPER_TABLELIST();
                if (hrm_timekeeper_tablelist.Finish(this.m_TimeKeeperTableListID).ToString() == "OK")
                {
                    this.m_IsLock = true;
                    this.m_IsFinish = true;
                    this.InitInterface();
                }
                else
                {
                    MessageBox.Show("Fail!");
                }
            }
        }

        private void bbiLock_ItemClick(object sender, ItemClickEventArgs e)
        {
            HRM_TIMEKEEPER_TABLELIST hrm_timekeeper_tablelist = new HRM_TIMEKEEPER_TABLELIST();
            if (hrm_timekeeper_tablelist.Lock(this.m_TimeKeeperTableListID).ToString() == "OK")
            {
                this.m_IsLock = true;
                this.InitInterface();
            }
            else
            {
                MessageBox.Show("Fail!");
            }
        }

        private void bbiOpen_ItemClick(object sender, ItemClickEventArgs e)
        {
            HRM_TIMEKEEPER_TABLELIST hrm_timekeeper_tablelist = new HRM_TIMEKEEPER_TABLELIST();
            if (hrm_timekeeper_tablelist.Open(this.m_TimeKeeperTableListID).ToString() == "OK")
            {
                this.m_IsLock = false;
                this.InitInterface();
            }
            else
            {
                MessageBox.Show("Fail!");
            }
        }

        private void bbiPrint_ItemClick(object sender, ItemClickEventArgs e)
        {
            rptTimekeeping xtraReport = new rptTimekeeping(this.m_EmployeeCode, this.m_Month, this.m_Year);
            new xfmReport("Bảng Chấm C\x00f4ng V\x00e0o Ra Th\x00e1ng " + this.m_Month.ToString() + "/" + this.m_Year.ToString()).ShowPrintPreview(xtraReport);
        }

        private void bbiReload_ItemClick(object sender, ItemClickEventArgs e)
        {
            this.Reload();
        }

        private void bbiSendMail_ItemClick(object sender, ItemClickEventArgs e)
        {
            this.xucListEmployee1.SendTimekeepingMail(this.m_Month, this.m_Year);
        }

        private void bbiTimekeepingBreak_ItemClick()
        {
            xfmTimekeepingBreak @break = new xfmTimekeepingBreak(this.m_TimeKeeperTableListID, this.m_EmployeeCode, this.m_ShiftCodeOld, this.m_DateOld);
            @break.Updated += delegate (object s, HRM_TIMEKEEPER_BREAK i) {
                HRM_TIMEKEEPER hrm_timekeeper = new HRM_TIMEKEEPER();
                hrm_timekeeper.Get(this.m_TimeKeeperTableListID, this.m_EmployeeCode, this.m_ShiftCodeOld, this.m_SymbolOld, this.m_DateOld, this.m_TimeInOld, this.m_TimeOutOld);
                this.gbList.SetFocusedRowCellValue(this.colTimeIn, hrm_timekeeper.TimeIn);
                this.gbList.SetFocusedRowCellValue(this.colTimeOut, hrm_timekeeper.TimeOut);
                this.gbList.SetFocusedRowCellValue(this.colHour, hrm_timekeeper.Hour);
                this.gbList.SetFocusedRowCellValue(this.colDayHour, hrm_timekeeper.DayHour);
                this.gbList.SetFocusedRowCellValue(this.colNightHour, hrm_timekeeper.NightHour);
                this.gbList.SetFocusedRowCellValue(this.colLateMinute, hrm_timekeeper.LateMinute);
                this.gbList.SetFocusedRowCellValue(this.colEarlyMinute, hrm_timekeeper.EarlyMinute);
                this.UpdateTimeKeeper();
            };
            @break.Added += delegate (object s, HRM_TIMEKEEPER_BREAK i) {
                HRM_TIMEKEEPER hrm_timekeeper = new HRM_TIMEKEEPER();
                hrm_timekeeper.Get(this.m_TimeKeeperTableListID, this.m_EmployeeCode, this.m_ShiftCodeOld, this.m_SymbolOld, this.m_DateOld, this.m_TimeInOld, this.m_TimeOutOld);
                this.gbList.SetFocusedRowCellValue(this.colTimeIn, hrm_timekeeper.TimeIn);
                this.gbList.SetFocusedRowCellValue(this.colTimeOut, hrm_timekeeper.TimeOut);
                this.gbList.SetFocusedRowCellValue(this.colHour, hrm_timekeeper.Hour);
                this.gbList.SetFocusedRowCellValue(this.colDayHour, hrm_timekeeper.DayHour);
                this.gbList.SetFocusedRowCellValue(this.colNightHour, hrm_timekeeper.NightHour);
                this.gbList.SetFocusedRowCellValue(this.colLateMinute, hrm_timekeeper.LateMinute);
                this.gbList.SetFocusedRowCellValue(this.colEarlyMinute, hrm_timekeeper.EarlyMinute);
                this.UpdateTimeKeeper();
            };
            @break.Deleted += delegate (object s, Common.Class.RowClickEventArgs i) {
                HRM_TIMEKEEPER hrm_timekeeper = new HRM_TIMEKEEPER();
                hrm_timekeeper.Get(this.m_TimeKeeperTableListID, this.m_EmployeeCode, this.m_ShiftCodeOld, this.m_SymbolOld, this.m_DateOld, this.m_TimeInOld, this.m_TimeOutOld);
                this.gbList.SetFocusedRowCellValue(this.colTimeIn, hrm_timekeeper.TimeIn);
                this.gbList.SetFocusedRowCellValue(this.colTimeOut, hrm_timekeeper.TimeOut);
                this.gbList.SetFocusedRowCellValue(this.colHour, hrm_timekeeper.Hour);
                this.gbList.SetFocusedRowCellValue(this.colDayHour, hrm_timekeeper.DayHour);
                this.gbList.SetFocusedRowCellValue(this.colNightHour, hrm_timekeeper.NightHour);
                this.gbList.SetFocusedRowCellValue(this.colLateMinute, hrm_timekeeper.LateMinute);
                this.gbList.SetFocusedRowCellValue(this.colEarlyMinute, hrm_timekeeper.EarlyMinute);
                this.UpdateTimeKeeper();
            };
            @break.ShowDialog();
        }

        private void bbiTimekeepingBreak_ItemClick(object sender, ItemClickEventArgs e)
        {
            this.bbiTimekeepingBreak_ItemClick();
        }

        private void bbiTimekeepingExtra_ItemClick()
        {
            new xfmTimekeepingExtra(this.m_TimeKeeperTableListID, this.m_EmployeeCode, this.m_ShiftCodeOld, this.m_DateOld).ShowDialog();
        }

        private void bbiTimekeepingExtra_ItemClick(object sender, ItemClickEventArgs e)
        {
            this.bbiTimekeepingExtra_ItemClick();
        }

        private void bbiTimekeepingPrivate_ItemClick()
        {
            new xfmTimekeepingPrivate(this.m_TimeKeeperTableListID, this.m_EmployeeCode, this.m_ShiftCodeOld, this.m_DateOld).ShowDialog();
        }

        private void bbiTimekeepingPrivate_ItemClick(object sender, ItemClickEventArgs e)
        {
            this.bbiTimekeepingPrivate_ItemClick();
        }

        private void btSymbolEdit_Click(object sender, EventArgs e)
        {
            new xfmSymbol().ShowDialog();
        }

        private void CreateTimeKeeper()
        {
            this.l_TimeKeeper.Create(this.m_Level, this.m_Code, this.m_TimeKeeperTableListID);
            this.RaiseTimekeeperTableInsertedHander();
        }

        protected override void Dispose(bool disposing)
        {
            if (disposing && (this.components != null))
            {
                this.components.Dispose();
            }
            base.Dispose(disposing);
        }

        private void dpFooter_SizeChanged(object sender, EventArgs e)
        {
            if (this.dpFooter.Visibility == DockVisibility.Visible)
            {
                SaveStyle(this.splitContainerControl1.SplitterPosition, this.splitContainerControl2.SplitterPosition, true, this.dpFooter.Height);
            }
            else
            {
                SaveStyle(this.splitContainerControl1.SplitterPosition, this.splitContainerControl2.SplitterPosition, false, this.dpFooter.Height);
            }
        }

        private void dpFooter_VisibilityChanged(object sender, VisibilityChangedEventArgs e)
        {
            if (this.dpFooter.Visibility == DockVisibility.Visible)
            {
                SaveStyle(this.splitContainerControl1.SplitterPosition, this.splitContainerControl2.SplitterPosition, true, this.dpFooter.Height);
            }
            else
            {
                SaveStyle(this.splitContainerControl1.SplitterPosition, this.splitContainerControl2.SplitterPosition, false, this.dpFooter.Height);
            }
        }

        private void gbList_CellValueChanging(object sender, CellValueChangedEventArgs e)
        {
        }

        private void gbList_CustomDrawRowIndicator(object sender, RowIndicatorCustomDrawEventArgs e)
        {
            if (e.RowHandle == -2147483648)
            {
                e.Handled = true;
                e.Painter.DrawObject(e.Info);
                Rectangle bounds = e.Bounds;
                e.Graphics.FillRectangle(new SolidBrush(Color.FromArgb(0x3f, 0xa5, 0xa5, 0)), bounds);
                bounds.Height--;
                bounds.Width--;
                e.Graphics.DrawRectangle(Pens.Blue, bounds);
            }
            int rowHandle = e.RowHandle;
            if (rowHandle >= 0)
            {
                rowHandle++;
                e.Info.DisplayText = rowHandle.ToString();
            }
        }

        private void gbList_DoubleClick(object sender, EventArgs e)
        {
            this.bbiTimekeepingBreak_ItemClick();
        }

        private void gbList_FocusedRowChanged(object sender, FocusedRowChangedEventArgs e)
        {
            try
            {
                System.DateTime time = Convert.ToDateTime(this.gbList.GetFocusedRowCellValue(this.colDate).ToString());
                this.m_DateOld = time;
                this.m_IsOverTimeOld = Convert.ToBoolean(this.gbList.GetFocusedRowCellValue(this.colIsOverTime).ToString());
                this.m_ShiftCodeOld = this.gbList.GetFocusedRowCellValue(this.colShiftCode).ToString();
                this.m_SymbolOld = this.gbList.GetFocusedRowCellValue(this.colSymbol).ToString();
                this.repSymbol.View.ClearColumnsFilter();
                if (this.m_ShiftCodeOld == "")
                {
                    this.repSymbol.View.ActiveFilterString = "[SymbolName] Like 'Tăng Ca%'";
                }
                else
                {
                    this.repSymbol.View.ActiveFilterString = "[SymbolName] Not Like 'Tăng Ca%'";
                }
                if (!this.m_IsOverTimeOld)
                {
                    this.l_Shift = new DIC_SHIFT();
                    this.l_Shift.Get(this.m_ShiftCodeOld);
                    this.m_TimeInOld = new System.DateTime(time.Year, time.Month, time.Day, this.l_Shift.BeginTime.Hour, this.l_Shift.BeginTime.Minute, this.l_Shift.BeginTime.Second);
                    this.m_TimeOutOld = new System.DateTime(time.Year, time.Month, time.Day, this.l_Shift.EndTime.Hour, this.l_Shift.EndTime.Minute, this.l_Shift.EndTime.Second);
                    if (this.l_Shift.IsOvernight)
                    {
                        this.m_TimeOutOld = DateAndTime.DateAdd(DateInterval.Day, 1.0, this.m_TimeOutOld);
                    }
                }
                else
                {
                    this.m_TimeInOld = Convert.ToDateTime(this.gbList.GetFocusedRowCellValue(this.colTimeIn).ToString());
                    this.m_TimeOutOld = Convert.ToDateTime(this.gbList.GetFocusedRowCellValue(this.colTimeOut).ToString());
                }
                this.m_HourOld = MyDateTime.NumberHour(this.m_TimeInOld, this.m_TimeOutOld);
                this.m_LateMinuteOld = 0;
                this.m_EarlyMinuteOld = 0;
            }
            catch
            {
            }
        }

        private void gbList_MouseDown(object sender, MouseEventArgs e)
        {
            if (e.Button == MouseButtons.Left)
            {
                base.DoShowMenu(this.gbList.CalcHitInfo(new Point(e.X, e.Y)), this.gbList, this);
            }
        }

        private void gcList_Click(object sender, EventArgs e)
        {
        }

        private void Init()
        {
            this.m_Month = this.clsAllOption.MonthDefault.Month;
            this.m_Year = this.clsAllOption.MonthDefault.Year;
            this.bbeMonth.EditValue = this.clsAllOption.MonthDefault;
            this.bbeYear.EditValue = this.clsAllOption.MonthDefault;
            this.repMonth.EditValueChanging += new ChangingEventHandler(this.repMonth_EditValueChanging);
            this.repMonth.EditValueChanged += new EventHandler(this.repMonth_EditValueChanged);
            this.repYear.EditValueChanging += new ChangingEventHandler(this.repYear_EditValueChanging);
            this.repYear.EditValueChanged += new EventHandler(this.repYear_EditValueChanged);
            this.repTimeIn.EditValueChanging += new ChangingEventHandler(this.repTimeIn_EditValueChanging);
            this.repTimeIn.EditValueChanged += new EventHandler(this.repTimeIn_EditValueChanged);
            this.repTimeOut.EditValueChanging += new ChangingEventHandler(this.repTimeOut_EditValueChanging);
            this.repTimeOut.EditValueChanged += new EventHandler(this.repTimeOut_EditValueChanged);
            this.repSymbol.EditValueChanging += new ChangingEventHandler(this.repSymbol_EditValueChanging);
            this.repSymbol.EditValueChanged += new EventHandler(this.repSymbol_EditValueChanged);
            this.repLateMinute.EditValueChanging += new ChangingEventHandler(this.repLateMinute_EditValueChanging);
            this.repLateMinute.EditValueChanged += new EventHandler(this.repLateMinute_EditValueChanged);
            this.repEarlyMinute.EditValueChanging += new ChangingEventHandler(this.repEarlyMinute_EditValueChanging);
            this.repEarlyMinute.EditValueChanged += new EventHandler(this.repEarlyMinute_EditValueChanged);
            this.xucOrganization1.LoadData();
            this.xucOrganization1.Selected += delegate (object s, Organization o) {
                System.DateTime dayFirstMonth = new System.DateTime(this.m_Year, this.m_Month, 1);
                System.DateTime dayEndMonth = new System.DateTime(this.m_Year, this.m_Month, System.DateTime.DaysInMonth(this.m_Year, this.m_Month));
                if (o.Level == 0)
                {
                    this.xucListEmployee1.LoadData(1, this.m_Level = 0, this.m_Code = "", dayFirstMonth, dayEndMonth);
                }
                else if (o.Level == 1)
                {
                    this.xucListEmployee1.LoadData(1, this.m_Level = 1, this.m_Code = o.BranchCode, dayFirstMonth, dayEndMonth);
                }
                else if (o.Level == 2)
                {
                    this.xucListEmployee1.LoadData(1, this.m_Level = 2, this.m_Code = o.DepartmentCode, dayFirstMonth, dayEndMonth);
                }
                else if (o.Level == 3)
                {
                    this.xucListEmployee1.LoadData(1, this.m_Level = 3, this.m_Code = o.GroupCode, dayFirstMonth, dayEndMonth);
                }
                this.xucListEmployee1.Clicked += new xucListEmployee.ClickedEventHander(this.xucListEmployee1_Clicked);
            };
            this.xucOrganization1.Updated += o => this.xucOrganization1.LoadData();
            new DIC_SYMBOL().AddOTRepositoryGridLookupEdit(this.repSymbol);
            this.xucListEmployee1.Clicked += new xucListEmployee.ClickedEventHander(this.xucListEmployee1_Clicked);
            this.xucListEmployee1.LoadData(1, this.m_Level, this.m_Code, new System.DateTime(this.m_Year, this.m_Month, 1), new System.DateTime(this.m_Year, this.m_Month, System.DateTime.DaysInMonth(this.m_Year, this.m_Month)));
        }

        private void InitializeComponent()
        {
            this.components = new Container();
            ComponentResourceManager manager = new ComponentResourceManager(typeof(xucTimekeeping));
            Common.MenuButton button = new Common.MenuButton();
            ItemCommand command = new ItemCommand();
            ItemCommand command2 = new ItemCommand();
            ItemCommand command3 = new ItemCommand();
            ItemCommand command4 = new ItemCommand();
            ItemCommand command5 = new ItemCommand();
            ItemCommand command6 = new ItemCommand();
            ItemCommand command7 = new ItemCommand();
            ItemCommand command8 = new ItemCommand();
            ItemCommand command9 = new ItemCommand();
            ItemCommand command10 = new ItemCommand();
            ItemCommand command11 = new ItemCommand();
            ItemCommand command12 = new ItemCommand();
            ItemCommand command13 = new ItemCommand();
            ItemCommand command14 = new ItemCommand();
            ItemCommand command15 = new ItemCommand();
            ItemCommand command16 = new ItemCommand();
            ItemCommand command17 = new ItemCommand();
            ItemCommand command18 = new ItemCommand();
            ItemCommand command19 = new ItemCommand();
            ItemCommand command20 = new ItemCommand();
            ItemCommand command21 = new ItemCommand();
            ItemCommand command22 = new ItemCommand();
            ItemCommand command23 = new ItemCommand();
            ItemCommand command24 = new ItemCommand();
            ItemCommand command25 = new ItemCommand();
            ItemCommand command26 = new ItemCommand();
            ItemCommand command27 = new ItemCommand();
            ItemCommand command28 = new ItemCommand();
            ItemCommand command29 = new ItemCommand();
            StyleFormatCondition condition = new StyleFormatCondition();
            StyleFormatCondition condition2 = new StyleFormatCondition();
            this.colShiftName = new GridColumn();
            this.colLateMinute = new GridColumn();
            this.repLateMinute = new RepositoryItemCalcEdit();
            this.barManager1 = new BarManager(this.components);
            this.bar1 = new Bar();
            this.bbeMonth = new BarEditItem();
            this.repMonth = new RepositoryItemTimeEdit();
            this.bbeYear = new BarEditItem();
            this.repYear = new RepositoryItemTimeEdit();
            this.bbeTimekeepingName = new BarEditItem();
            this.repositoryItemTextEdit2 = new RepositoryItemTextEdit();
            this.bbiPrint = new BarButtonItem();
            this.bbiExport = new BarButtonItem();
            this.bbiLock = new BarButtonItem();
            this.bbiOpen = new BarButtonItem();
            this.bbiFinish = new BarButtonItem();
            this.bbiReload = new BarButtonItem();
            this.bbiSendMail = new BarButtonItem();
            this.bbiClose = new BarButtonItem();
            this.barDockControlTop = new BarDockControl();
            this.barDockControlBottom = new BarDockControl();
            this.barDockControlLeft = new BarDockControl();
            this.barDockControlRight = new BarDockControl();
            this.dockManager1 = new DockManager(this.components);
            this.hideContainerBottom = new AutoHideContainer();
            this.dpFooter = new DockPanel();
            this.dockPanel1_Container = new ControlContainer();
            this.imageCollection2 = new DevExpress.Utils.ImageCollection(this.components);
            this.bbiSave = new BarButtonItem();
            this.bbiTimekeepingBreak = new BarButtonItem();
            this.bbiTimekeepingExtra = new BarButtonItem();
            this.bbiTimekeepingPrivate = new BarButtonItem();
            this.xucOrganization1 = new xucOrganization();
            this.gcList = new GridControl();
            this.gbList = new GridView();
            this.colDate = new GridColumn();
            this.colShiftCode = new GridColumn();
            this.colTimeIn = new GridColumn();
            this.repTimeIn = new RepositoryItemTimeEdit();
            this.colTimeOut = new GridColumn();
            this.repTimeOut = new RepositoryItemTimeEdit();
            this.colSymbol = new GridColumn();
            this.repSymbol = new RepositoryItemGridLookUpEdit();
            this.repSymbolView = new GridView();
            this.gridColumn1 = new GridColumn();
            this.gridColumn2 = new GridColumn();
            this.colHour = new GridColumn();
            this.colDayHour = new GridColumn();
            this.colNightHour = new GridColumn();
            this.colPrivateHour = new GridColumn();
            this.colEarlyMinute = new GridColumn();
            this.repEarlyMinute = new RepositoryItemCalcEdit();
            this.colIsOverTime = new GridColumn();
            this.colIsWork = new GridColumn();
            this.colSorted = new GridColumn();
            this.colDescription = new GridColumn();
            this.splitContainerControl1 = new SplitContainerControl();
            this.xucListEmployee1 = new xucListEmployee();
            this.panelControl1 = new PanelControl();
            this.txtEmployeeCode = new LabelControl();
            this.txtEmployeeName = new LabelControl();
            this.flowLayoutPanel1 = new FlowLayoutPanel();
            this.lbOverTimeHour = new LabelControl();
            this.labelControl15 = new LabelControl();
            this.lbTotalHour = new LabelControl();
            this.labelControl16 = new LabelControl();
            this.ptLock = new PictureBox();
            this.ptFinish = new PictureBox();
            this.imgPhoto = new PictureEdit();
            this.flowLayoutPanel2 = new FlowLayoutPanel();
            this.lbEarlyMinute = new LabelControl();
            this.labelControl20 = new LabelControl();
            this.lbLateMinute = new LabelControl();
            this.labelControl17 = new LabelControl();
            this.pnInformation = new PanelControl();
            this.lblState = new Label();
            this.ptFail = new PictureBox();
            this.splitContainerControl2 = new SplitContainerControl();
            this.popupMenu1 = new PopupMenu(this.components);
            this.repLateMinute.BeginInit();
            this.barManager1.BeginInit();
            this.repMonth.BeginInit();
            this.repYear.BeginInit();
            this.repositoryItemTextEdit2.BeginInit();
            this.dockManager1.BeginInit();
            this.hideContainerBottom.SuspendLayout();
            this.dpFooter.SuspendLayout();
            this.imageCollection2.BeginInit();
            this.gcList.BeginInit();
            this.gbList.BeginInit();
            this.repTimeIn.BeginInit();
            this.repTimeOut.BeginInit();
            this.repSymbol.BeginInit();
            this.repSymbolView.BeginInit();
            this.repEarlyMinute.BeginInit();
            this.splitContainerControl1.BeginInit();
            this.splitContainerControl1.SuspendLayout();
            this.panelControl1.BeginInit();
            this.panelControl1.SuspendLayout();
            this.flowLayoutPanel1.SuspendLayout();
            ((ISupportInitialize) this.ptLock).BeginInit();
            ((ISupportInitialize) this.ptFinish).BeginInit();
            this.imgPhoto.Properties.BeginInit();
            this.flowLayoutPanel2.SuspendLayout();
            this.pnInformation.BeginInit();
            this.pnInformation.SuspendLayout();
            ((ISupportInitialize) this.ptFail).BeginInit();
            this.splitContainerControl2.BeginInit();
            this.splitContainerControl2.SuspendLayout();
            this.popupMenu1.BeginInit();
            base.SuspendLayout();
            this.colShiftName.AppearanceHeader.Options.UseTextOptions = true;
            this.colShiftName.AppearanceHeader.TextOptions.WordWrap = WordWrap.Wrap;
            this.colShiftName.Caption = "Ca chấm c\x00f4ng";
            this.colShiftName.FieldName = "ShiftName";
            this.colShiftName.Name = "colShiftName";
            this.colShiftName.OptionsColumn.AllowEdit = false;
            this.colShiftName.OptionsColumn.ReadOnly = true;
            this.colShiftName.Visible = true;
            this.colShiftName.VisibleIndex = 0;
            this.colShiftName.Width = 0x4f;
            this.colLateMinute.AppearanceCell.Font = new Font("Tahoma", 8.25f, FontStyle.Bold);
            this.colLateMinute.AppearanceCell.Options.UseFont = true;
            this.colLateMinute.Caption = "Đi trể";
            this.colLateMinute.ColumnEdit = this.repLateMinute;
            this.colLateMinute.FieldName = "LateMinute";
            this.colLateMinute.Fixed = FixedStyle.Right;
            this.colLateMinute.Name = "colLateMinute";
            this.colLateMinute.SummaryItem.DisplayFormat = "{0} (ph\x00fat)";
            this.colLateMinute.SummaryItem.SummaryType = SummaryItemType.Sum;
            this.colLateMinute.Visible = true;
            this.colLateMinute.VisibleIndex = 5;
            this.colLateMinute.Width = 50;
            this.repLateMinute.AutoHeight = false;
            this.repLateMinute.Buttons.AddRange(new EditorButton[] { new EditorButton(ButtonPredefines.Combo) });
            this.repLateMinute.EditValueChangedFiringMode = EditValueChangedFiringMode.Buffered;
            this.repLateMinute.Name = "repLateMinute";
            this.barManager1.AllowShowToolbarsPopup = false;
            this.barManager1.Bars.AddRange(new Bar[] { this.bar1 });
            this.barManager1.DockControls.Add(this.barDockControlTop);
            this.barManager1.DockControls.Add(this.barDockControlBottom);
            this.barManager1.DockControls.Add(this.barDockControlLeft);
            this.barManager1.DockControls.Add(this.barDockControlRight);
            this.barManager1.DockManager = this.dockManager1;
            this.barManager1.Form = this;
            this.barManager1.Images = this.imageCollection2;
            this.barManager1.Items.AddRange(new BarItem[] { this.bbiLock, this.bbeTimekeepingName, this.bbiSave, this.bbiClose, this.bbiReload, this.bbiPrint, this.bbeMonth, this.bbeYear, this.bbiExport, this.bbiOpen, this.bbiFinish, this.bbiSendMail, this.bbiTimekeepingBreak, this.bbiTimekeepingExtra, this.bbiTimekeepingPrivate });
            this.barManager1.MaxItemId = 0x15;
            this.barManager1.RepositoryItems.AddRange(new RepositoryItem[] { this.repositoryItemTextEdit2, this.repMonth, this.repYear });
            this.bar1.BarName = "Tools";
            this.bar1.DockCol = 0;
            this.bar1.DockRow = 0;
            this.bar1.DockStyle = BarDockStyle.Top;
            this.bar1.LinksPersistInfo.AddRange(new LinkPersistInfo[] { new LinkPersistInfo(BarLinkUserDefines.PaintStyle, this.bbeMonth, "", true, true, true, 0, null, BarItemPaintStyle.CaptionGlyph), new LinkPersistInfo(BarLinkUserDefines.PaintStyle, this.bbeYear, BarItemPaintStyle.CaptionGlyph), new LinkPersistInfo(BarLinkUserDefines.PaintStyle, this.bbeTimekeepingName, "", true, true, true, 0, null, BarItemPaintStyle.CaptionGlyph), new LinkPersistInfo(BarLinkUserDefines.PaintStyle, this.bbiPrint, "", true, true, true, 0, null, BarItemPaintStyle.CaptionGlyph), new LinkPersistInfo(BarLinkUserDefines.PaintStyle, this.bbiExport, BarItemPaintStyle.CaptionGlyph), new LinkPersistInfo(BarLinkUserDefines.PaintStyle, this.bbiLock, "", true, true, true, 0, null, BarItemPaintStyle.CaptionGlyph), new LinkPersistInfo(BarLinkUserDefines.PaintStyle, this.bbiOpen, BarItemPaintStyle.CaptionGlyph), new LinkPersistInfo(BarLinkUserDefines.PaintStyle, this.bbiFinish, BarItemPaintStyle.CaptionGlyph), new LinkPersistInfo(BarLinkUserDefines.PaintStyle, this.bbiReload, "", true, true, true, 0, null, BarItemPaintStyle.CaptionGlyph), new LinkPersistInfo(BarLinkUserDefines.PaintStyle, this.bbiSendMail, BarItemPaintStyle.CaptionGlyph), new LinkPersistInfo(BarLinkUserDefines.PaintStyle, this.bbiClose, "", true, true, true, 0, null, BarItemPaintStyle.CaptionGlyph) });
            this.bar1.OptionsBar.UseWholeRow = true;
            this.bar1.Text = "Tools";
            this.bbeMonth.Caption = "Th\x00e1ng:";
            this.bbeMonth.Edit = this.repMonth;
            this.bbeMonth.Id = 12;
            this.bbeMonth.Name = "bbeMonth";
            this.repMonth.Appearance.Font = new Font("Tahoma", 8.25f, FontStyle.Bold);
            this.repMonth.Appearance.Options.UseFont = true;
            this.repMonth.AutoHeight = false;
            this.repMonth.Buttons.AddRange(new EditorButton[] { new EditorButton() });
            this.repMonth.Mask.EditMask = "MM";
            this.repMonth.Name = "repMonth";
            this.bbeYear.Caption = "Năm:";
            this.bbeYear.Edit = this.repYear;
            this.bbeYear.Id = 13;
            this.bbeYear.Name = "bbeYear";
            this.repYear.Appearance.Font = new Font("Tahoma", 8.25f, FontStyle.Bold);
            this.repYear.Appearance.Options.UseFont = true;
            this.repYear.AutoHeight = false;
            this.repYear.Buttons.AddRange(new EditorButton[] { new EditorButton() });
            this.repYear.Mask.EditMask = "yyyy";
            this.repYear.Name = "repYear";
            this.bbeTimekeepingName.Caption = "T\x00ean Bảng Chấm C\x00f4ng:";
            this.bbeTimekeepingName.Edit = this.repositoryItemTextEdit2;
            this.bbeTimekeepingName.Id = 4;
            this.bbeTimekeepingName.Name = "bbeTimekeepingName";
            this.bbeTimekeepingName.Width = 120;
            this.repositoryItemTextEdit2.Appearance.Font = new Font("Tahoma", 8.25f, FontStyle.Bold);
            this.repositoryItemTextEdit2.Appearance.Options.UseFont = true;
            this.repositoryItemTextEdit2.AutoHeight = false;
            this.repositoryItemTextEdit2.Name = "repositoryItemTextEdit2";
            this.repositoryItemTextEdit2.ReadOnly = true;
            this.bbiPrint.Caption = "In";
            this.bbiPrint.Id = 10;
            this.bbiPrint.ImageIndex = 9;
            this.bbiPrint.Name = "bbiPrint";
            this.bbiPrint.ItemClick += new ItemClickEventHandler(this.bbiPrint_ItemClick);
            this.bbiExport.Caption = "Xuất";
            this.bbiExport.Id = 14;
            this.bbiExport.ImageIndex = 0x31;
            this.bbiExport.Name = "bbiExport";
            this.bbiExport.ItemClick += new ItemClickEventHandler(this.bbiExport_ItemClick);
            this.bbiLock.Caption = "Kh\x00f3a Sổ";
            this.bbiLock.Id = 3;
            this.bbiLock.ImageIndex = 12;
            this.bbiLock.Name = "bbiLock";
            this.bbiLock.ItemClick += new ItemClickEventHandler(this.bbiLock_ItemClick);
            this.bbiOpen.Caption = "Mở Sổ";
            this.bbiOpen.Id = 15;
            this.bbiOpen.ImageIndex = 0x1f;
            this.bbiOpen.Name = "bbiOpen";
            this.bbiOpen.ItemClick += new ItemClickEventHandler(this.bbiOpen_ItemClick);
            this.bbiFinish.Caption = "Ho\x00e0n Th\x00e0nh";
            this.bbiFinish.Id = 0x10;
            this.bbiFinish.ImageIndex = 0x21;
            this.bbiFinish.Name = "bbiFinish";
            this.bbiFinish.ItemClick += new ItemClickEventHandler(this.bbiFinish_ItemClick);
            this.bbiReload.Caption = "Nạp Lại";
            this.bbiReload.Id = 9;
            this.bbiReload.ImageIndex = 0x2a;
            this.bbiReload.Name = "bbiReload";
            this.bbiReload.ItemClick += new ItemClickEventHandler(this.bbiReload_ItemClick);
            this.bbiSendMail.Caption = "Gửi Mail";
            this.bbiSendMail.Id = 0x11;
            this.bbiSendMail.ImageIndex = 70;
            this.bbiSendMail.Name = "bbiSendMail";
            this.bbiSendMail.ItemClick += new ItemClickEventHandler(this.bbiSendMail_ItemClick);
            this.bbiClose.Caption = "Đ\x00f3ng";
            this.bbiClose.Id = 8;
            this.bbiClose.ImageIndex = 0x16;
            this.bbiClose.Name = "bbiClose";
            this.bbiClose.ItemClick += new ItemClickEventHandler(this.bbiClose_ItemClick);
            this.dockManager1.AutoHideContainers.AddRange(new AutoHideContainer[] { this.hideContainerBottom });
            this.dockManager1.Form = this;
            this.dockManager1.TopZIndexControls.AddRange(new string[] { "DevExpress.XtraBars.BarDockControl", "DevExpress.XtraBars.StandaloneBarDockControl", "System.Windows.Forms.StatusBar", "DevExpress.XtraBars.Ribbon.RibbonStatusBar", "DevExpress.XtraBars.Ribbon.RibbonControl" });
            this.hideContainerBottom.Controls.Add(this.dpFooter);
            this.hideContainerBottom.Dock = DockStyle.Bottom;
            this.hideContainerBottom.Location = new Point(0, 0x283);
            this.hideContainerBottom.Name = "hideContainerBottom";
            this.hideContainerBottom.Size = new Size(0x49f, 0x13);
            this.dpFooter.Controls.Add(this.dockPanel1_Container);
            this.dpFooter.Dock = DockingStyle.Bottom;
            this.dpFooter.ID = new Guid("d3a0a070-bbe9-459b-90ef-f6264bc60416");
            this.dpFooter.Location = new Point(0, 0);
            this.dpFooter.Name = "dpFooter";
            this.dpFooter.OriginalSize = new Size(200, 0x6c);
            this.dpFooter.SavedDock = DockingStyle.Bottom;
            this.dpFooter.SavedIndex = 0;
            this.dpFooter.Size = new Size(0x49f, 0x6c);
            this.dpFooter.Text = "K\x00dd HIỆU CHẤM C\x00d4NG (L\x00e0m việc thực tế)";
            this.dpFooter.Visibility = DockVisibility.AutoHide;
            this.dpFooter.VisibilityChanged += new VisibilityChangedEventHandler(this.dpFooter_VisibilityChanged);
            this.dpFooter.SizeChanged += new EventHandler(this.dpFooter_SizeChanged);
            this.dockPanel1_Container.Location = new Point(3, 0x19);
            this.dockPanel1_Container.Name = "dockPanel1_Container";
            this.dockPanel1_Container.Size = new Size(0x499, 80);
            this.dockPanel1_Container.TabIndex = 0;
            this.imageCollection2.ImageStream = (ImageCollectionStreamer) manager.GetObject("imageCollection2.ImageStream");
            this.imageCollection2.Images.SetKeyName(0x3d, "Vista (35).ico");
            this.imageCollection2.Images.SetKeyName(0x3e, "Security.ico");
            this.imageCollection2.Images.SetKeyName(0x3f, "RibbonPrintPreview_DocumentMapLarge.png");
            this.imageCollection2.Images.SetKeyName(0x40, "11.png");
            this.imageCollection2.Images.SetKeyName(0x41, "Sua.png");
            this.imageCollection2.Images.SetKeyName(0x42, "Them.png");
            this.imageCollection2.Images.SetKeyName(0x43, "PhanQuyen.png");
            this.imageCollection2.Images.SetKeyName(0x44, "11.png");
            this.imageCollection2.Images.SetKeyName(0x45, "plus.png");
            this.imageCollection2.Images.SetKeyName(70, "send.png");
            this.bbiSave.Caption = "Lưu";
            this.bbiSave.Id = 5;
            this.bbiSave.ImageIndex = 10;
            this.bbiSave.Name = "bbiSave";
            this.bbiSave.Visibility = BarItemVisibility.Never;
            this.bbiTimekeepingBreak.Caption = "Ra/V\x00e0o Trong Ca";
            this.bbiTimekeepingBreak.Id = 0x12;
            this.bbiTimekeepingBreak.Name = "bbiTimekeepingBreak";
            this.bbiTimekeepingBreak.ItemClick += new ItemClickEventHandler(this.bbiTimekeepingBreak_ItemClick);
            this.bbiTimekeepingExtra.Caption = "Tăng Cường Sau Ca L\x00e0m Việc";
            this.bbiTimekeepingExtra.Id = 0x13;
            this.bbiTimekeepingExtra.Name = "bbiTimekeepingExtra";
            this.bbiTimekeepingExtra.ItemClick += new ItemClickEventHandler(this.bbiTimekeepingExtra_ItemClick);
            this.bbiTimekeepingPrivate.Caption = "L\x00e0m Việc Ri\x00eang";
            this.bbiTimekeepingPrivate.Id = 20;
            this.bbiTimekeepingPrivate.Name = "bbiTimekeepingPrivate";
            this.bbiTimekeepingPrivate.ItemClick += new ItemClickEventHandler(this.bbiTimekeepingPrivate_ItemClick);
            this.xucOrganization1.Dock = DockStyle.Fill;
            this.xucOrganization1.IsClose = CloseOrNew.None;
            this.xucOrganization1.Location = new Point(0, 0);
            this.xucOrganization1.Name = "xucOrganization1";
            this.xucOrganization1.NotSave = false;
            command.Caption = "";
            command.Enable = false;
            command.Visibility = BarItemVisibility.Never;
            button.Add = command;
            command2.Caption = "";
            command2.Enable = false;
            command2.Visibility = BarItemVisibility.Never;
            button.Cancel = command2;
            command3.Caption = "";
            command3.Enable = false;
            command3.Visibility = BarItemVisibility.Never;
            button.Change = command3;
            command4.Caption = "";
            command4.Enable = false;
            command4.Visibility = BarItemVisibility.Never;
            button.Close = command4;
            command5.Caption = "";
            command5.Enable = false;
            command5.Visibility = BarItemVisibility.Never;
            button.Custom = command5;
            command6.Caption = "";
            command6.Enable = false;
            command6.Visibility = BarItemVisibility.Never;
            button.Delete = command6;
            command7.Caption = "";
            command7.Enable = false;
            command7.Visibility = BarItemVisibility.Never;
            button.Export = command7;
            command8.Caption = "";
            command8.Enable = false;
            command8.Visibility = BarItemVisibility.Never;
            button.Filter = command8;
            command9.Caption = "";
            command9.Enable = false;
            command9.Visibility = BarItemVisibility.Never;
            button.FilterCustomer = command9;
            command10.Caption = "";
            command10.Enable = false;
            command10.Visibility = BarItemVisibility.Never;
            button.FilterStock = command10;
            command11.Caption = "";
            command11.Enable = false;
            command11.Visibility = BarItemVisibility.Never;
            button.Find = command11;
            button.GClose = false;
            button.GCommand = false;
            button.GExport = false;
            command12.Caption = "";
            command12.Enable = false;
            command12.Visibility = BarItemVisibility.Never;
            button.Go = command12;
            button.GOption = false;
            button.GPrint = false;
            button.GRecords = false;
            button.GSearchBar = false;
            button.GSettings = false;
            button.GVaildation = false;
            command13.Caption = "";
            command13.Enable = false;
            command13.Visibility = BarItemVisibility.Never;
            button.Import = command13;
            command14.Caption = "";
            command14.Enable = false;
            command14.Visibility = BarItemVisibility.Never;
            button.Next = command14;
            command15.Caption = "";
            command15.Enable = false;
            command15.Visibility = BarItemVisibility.Never;
            button.PageSetup = command15;
            button.PHome = false;
            command16.Caption = "";
            command16.Enable = false;
            command16.Visibility = BarItemVisibility.Never;
            button.Previous = command16;
            command17.Caption = "";
            command17.Enable = false;
            command17.Visibility = BarItemVisibility.Never;
            button.Print = command17;
            command18.Caption = "";
            command18.Enable = false;
            command18.Visibility = BarItemVisibility.Never;
            button.PrintPreview = command18;
            button.PTool = false;
            command19.Caption = "";
            command19.Enable = false;
            command19.Visibility = BarItemVisibility.Never;
            button.Redo = command19;
            command20.Caption = "";
            command20.Enable = false;
            command20.Visibility = BarItemVisibility.Never;
            button.Refresh = command20;
            command21.Caption = "";
            command21.Enable = false;
            command21.Visibility = BarItemVisibility.Never;
            button.Save = command21;
            command22.Caption = "";
            command22.Enable = false;
            command22.Visibility = BarItemVisibility.Never;
            button.SaveAndClose = command22;
            command23.Caption = "";
            command23.Enable = false;
            command23.Visibility = BarItemVisibility.Never;
            button.SaveAndNew = command23;
            command24.Caption = "";
            command24.Enable = false;
            command24.Visibility = BarItemVisibility.Never;
            button.Search = command24;
            command25.Caption = "";
            command25.Enable = false;
            command25.Visibility = BarItemVisibility.Never;
            button.SearchText = command25;
            command26.Caption = "";
            command26.Enable = false;
            command26.Visibility = BarItemVisibility.Never;
            button.Task = command26;
            command27.Caption = "";
            command27.Enable = false;
            command27.Visibility = BarItemVisibility.Never;
            button.Undo = command27;
            command28.Caption = "";
            command28.Enable = false;
            command28.Visibility = BarItemVisibility.Never;
            button.Vaildate = command28;
            command29.Caption = "";
            command29.Enable = false;
            command29.Visibility = BarItemVisibility.Never;
            button.View = command29;
            this.xucOrganization1.RibbonBar = button;
            this.xucOrganization1.Size = new Size(280, 0x249);
            this.xucOrganization1.Status = Actions.None;
            this.xucOrganization1.TabIndex = 0;
            this.xucOrganization1.Title = "";
            this.gcList.Dock = DockStyle.Fill;
            this.gcList.EmbeddedNavigator.Buttons.Append.Visible = false;
            this.gcList.EmbeddedNavigator.Buttons.CancelEdit.Visible = false;
            this.gcList.EmbeddedNavigator.Buttons.Edit.Visible = false;
            this.gcList.EmbeddedNavigator.Buttons.EndEdit.Visible = false;
            this.gcList.EmbeddedNavigator.Buttons.Remove.Visible = false;
            this.gcList.EmbeddedNavigator.TextStringFormat = "{0}/{1}";
            this.gcList.Location = new Point(0, 0x2f);
            this.gcList.MainView = this.gbList;
            this.gcList.Name = "gcList";
            this.gcList.RepositoryItems.AddRange(new RepositoryItem[] { this.repTimeIn, this.repSymbol, this.repTimeOut, this.repLateMinute, this.repEarlyMinute });
            this.gcList.Size = new Size(0x288, 0x21a);
            this.gcList.TabIndex = 4;
            this.gcList.UseEmbeddedNavigator = true;
            this.gcList.ViewCollection.AddRange(new BaseView[] { this.gbList });
            this.gcList.Click += new EventHandler(this.gcList_Click);
            this.gbList.Appearance.GroupRow.Font = new Font("Tahoma", 8.25f, FontStyle.Bold);
            this.gbList.Appearance.GroupRow.Options.UseFont = true;
            this.gbList.Columns.AddRange(new GridColumn[] { this.colDate, this.colShiftCode, this.colShiftName, this.colTimeIn, this.colTimeOut, this.colSymbol, this.colHour, this.colDayHour, this.colNightHour, this.colPrivateHour, this.colLateMinute, this.colEarlyMinute, this.colIsOverTime, this.colIsWork, this.colSorted, this.colDescription });
            this.gbList.FocusRectStyle = DrawFocusRectStyle.RowFocus;
            condition.Appearance.BackColor = Color.MistyRose;
            condition.Appearance.Font = new Font("Tahoma", 8.25f, FontStyle.Bold);
            condition.Appearance.Options.UseBackColor = true;
            condition.Appearance.Options.UseFont = true;
            condition.ApplyToRow = true;
            condition.Condition = FormatConditionEnum.Expression;
            condition.Expression = "GetDayOfWeek([Date]) ==0 Or [IsOverTime] == True";
            condition2.Appearance.BackColor = Color.Ivory;
            condition2.Appearance.Options.UseBackColor = true;
            condition2.ApplyToRow = true;
            condition2.Column = this.colShiftName;
            condition2.Condition = FormatConditionEnum.Equal;
            condition2.Value1 = "Trực đ\x00eam";
            this.gbList.FormatConditions.AddRange(new StyleFormatCondition[] { condition, condition2 });
            this.gbList.GridControl = this.gcList;
            this.gbList.GroupCount = 1;
            this.gbList.GroupPanelText = "K\x00e9o v\x00e0 Thả cột v\x00e0o đ\x00e2y để nh\x00f3m dữ liệu";
            this.gbList.GroupSummary.AddRange(new GridSummaryItem[] { new GridGroupSummaryItem(SummaryItemType.Sum, "Hour", null, "- Tổng giờ l\x00e0m: {0} giờ") });
            this.gbList.IndicatorWidth = 40;
            this.gbList.Name = "gbList";
            this.gbList.OptionsBehavior.AllowIncrementalSearch = true;
            this.gbList.OptionsBehavior.CopyToClipboardWithColumnHeaders = false;
            this.gbList.OptionsBehavior.FocusLeaveOnTab = true;
            this.gbList.OptionsLayout.StoreAllOptions = true;
            this.gbList.OptionsLayout.StoreAppearance = true;
            this.gbList.OptionsMenu.EnableColumnMenu = false;
            this.gbList.OptionsMenu.EnableGroupPanelMenu = false;
            this.gbList.OptionsNavigation.EnterMoveNextColumn = true;
            this.gbList.OptionsSelection.InvertSelection = true;
            this.gbList.OptionsSelection.MultiSelect = true;
            this.gbList.OptionsView.ShowAutoFilterRow = true;
            this.gbList.OptionsView.ShowFooter = true;
            this.gbList.OptionsView.ShowGroupPanel = false;
            this.gbList.SortInfo.AddRange(new GridColumnSortInfo[] { new GridColumnSortInfo(this.colDate, ColumnSortOrder.Ascending), new GridColumnSortInfo(this.colShiftName, ColumnSortOrder.Ascending) });
            this.gbList.FocusedRowChanged += new FocusedRowChangedEventHandler(this.gbList_FocusedRowChanged);
            this.gbList.CustomDrawRowIndicator += new RowIndicatorCustomDrawEventHandler(this.gbList_CustomDrawRowIndicator);
            this.gbList.CellValueChanging += new CellValueChangedEventHandler(this.gbList_CellValueChanging);
            this.gbList.MouseDown += new MouseEventHandler(this.gbList_MouseDown);
            this.gbList.DoubleClick += new EventHandler(this.gbList_DoubleClick);
            this.colDate.Caption = "Ng\x00e0y chấm c\x00f4ng";
            this.colDate.FieldName = "Date";
            this.colDate.Name = "colDate";
            this.colShiftCode.Caption = "M\x00e3 ca";
            this.colShiftCode.FieldName = "ShiftCode";
            this.colShiftCode.Name = "colShiftCode";
            this.colTimeIn.Caption = "Giờ v\x00e0o";
            this.colTimeIn.ColumnEdit = this.repTimeIn;
            this.colTimeIn.FieldName = "TimeIn";
            this.colTimeIn.Name = "colTimeIn";
            this.colTimeIn.Visible = true;
            this.colTimeIn.VisibleIndex = 1;
            this.colTimeIn.Width = 70;
            this.repTimeIn.AutoHeight = false;
            this.repTimeIn.Buttons.AddRange(new EditorButton[] { new EditorButton() });
            this.repTimeIn.Mask.EditMask = "HH:mm tt";
            this.repTimeIn.Name = "repTimeIn";
            this.colTimeOut.Caption = "Giờ ra";
            this.colTimeOut.ColumnEdit = this.repTimeOut;
            this.colTimeOut.FieldName = "TimeOut";
            this.colTimeOut.Name = "colTimeOut";
            this.colTimeOut.Visible = true;
            this.colTimeOut.VisibleIndex = 2;
            this.colTimeOut.Width = 70;
            this.repTimeOut.AutoHeight = false;
            this.repTimeOut.Buttons.AddRange(new EditorButton[] { new EditorButton() });
            this.repTimeOut.Mask.EditMask = "HH:mm tt";
            this.repTimeOut.Name = "repTimeOut";
            this.colSymbol.AppearanceHeader.Options.UseTextOptions = true;
            this.colSymbol.AppearanceHeader.TextOptions.WordWrap = WordWrap.Wrap;
            this.colSymbol.Caption = "K\x00fd hiệu chấm c\x00f4ng";
            this.colSymbol.ColumnEdit = this.repSymbol;
            this.colSymbol.FieldName = "Symbol";
            this.colSymbol.Name = "colSymbol";
            this.colSymbol.Visible = true;
            this.colSymbol.VisibleIndex = 3;
            this.colSymbol.Width = 0x4d;
            this.repSymbol.AutoHeight = false;
            this.repSymbol.Buttons.AddRange(new EditorButton[] { new EditorButton(ButtonPredefines.Combo) });
            this.repSymbol.Name = "repSymbol";
            this.repSymbol.View = this.repSymbolView;
            this.repSymbol.QueryPopUp += new CancelEventHandler(this.repSymbol_QueryPopUp);
            this.repSymbolView.Columns.AddRange(new GridColumn[] { this.gridColumn1, this.gridColumn2 });
            this.repSymbolView.FocusRectStyle = DrawFocusRectStyle.RowFocus;
            this.repSymbolView.Name = "repSymbolView";
            this.repSymbolView.OptionsSelection.EnableAppearanceFocusedCell = false;
            this.repSymbolView.OptionsView.ShowAutoFilterRow = true;
            this.repSymbolView.OptionsView.ShowFilterPanelMode = ShowFilterPanelMode.Never;
            this.repSymbolView.OptionsView.ShowGroupPanel = false;
            this.gridColumn1.Caption = "M\x00e3 k\x00fd hiệu";
            this.gridColumn1.FieldName = "SymbolCode";
            this.gridColumn1.Name = "gridColumn1";
            this.gridColumn1.Visible = true;
            this.gridColumn1.VisibleIndex = 0;
            this.gridColumn1.Width = 100;
            this.gridColumn2.Caption = "T\x00ean k\x00fd hiệu";
            this.gridColumn2.FieldName = "SymbolName";
            this.gridColumn2.Name = "gridColumn2";
            this.gridColumn2.Visible = true;
            this.gridColumn2.VisibleIndex = 1;
            this.gridColumn2.Width = 240;
            this.colHour.AppearanceCell.Font = new Font("Tahoma", 8.25f, FontStyle.Bold);
            this.colHour.AppearanceCell.Options.UseFont = true;
            this.colHour.AppearanceHeader.Options.UseTextOptions = true;
            this.colHour.AppearanceHeader.TextOptions.WordWrap = WordWrap.Wrap;
            this.colHour.Caption = "Tổng giờ";
            this.colHour.FieldName = "Hour";
            this.colHour.Fixed = FixedStyle.Right;
            this.colHour.Name = "colHour";
            this.colHour.OptionsColumn.ReadOnly = true;
            this.colHour.SummaryItem.DisplayFormat = "{0} (giờ)";
            this.colHour.SummaryItem.SummaryType = SummaryItemType.Sum;
            this.colHour.Visible = true;
            this.colHour.VisibleIndex = 4;
            this.colHour.Width = 0x44;
            this.colDayHour.Caption = "Ng\x00e0y (h)";
            this.colDayHour.FieldName = "DayHour";
            this.colDayHour.Fixed = FixedStyle.Right;
            this.colDayHour.Name = "colDayHour";
            this.colDayHour.OptionsColumn.ReadOnly = true;
            this.colDayHour.SummaryItem.DisplayFormat = "{0} (giờ)";
            this.colDayHour.SummaryItem.SummaryType = SummaryItemType.Sum;
            this.colDayHour.Width = 0x41;
            this.colNightHour.Caption = "Đ\x00eam (h)";
            this.colNightHour.FieldName = "NightHour";
            this.colNightHour.Fixed = FixedStyle.Right;
            this.colNightHour.Name = "colNightHour";
            this.colNightHour.OptionsColumn.ReadOnly = true;
            this.colNightHour.SummaryItem.DisplayFormat = "{0} (giờ)";
            this.colNightHour.SummaryItem.SummaryType = SummaryItemType.Sum;
            this.colNightHour.Width = 0x40;
            this.colPrivateHour.Caption = "L\x00e0m việc ri\x00eang (h)";
            this.colPrivateHour.FieldName = "PrivateHour";
            this.colPrivateHour.Fixed = FixedStyle.Right;
            this.colPrivateHour.Name = "colPrivateHour";
            this.colEarlyMinute.AppearanceCell.Font = new Font("Tahoma", 8.25f, FontStyle.Bold);
            this.colEarlyMinute.AppearanceCell.Options.UseFont = true;
            this.colEarlyMinute.Caption = "Về sớm";
            this.colEarlyMinute.ColumnEdit = this.repEarlyMinute;
            this.colEarlyMinute.FieldName = "EarlyMinute";
            this.colEarlyMinute.Fixed = FixedStyle.Right;
            this.colEarlyMinute.Name = "colEarlyMinute";
            this.colEarlyMinute.SummaryItem.DisplayFormat = "{0} (ph\x00fat)";
            this.colEarlyMinute.SummaryItem.SummaryType = SummaryItemType.Sum;
            this.colEarlyMinute.Visible = true;
            this.colEarlyMinute.VisibleIndex = 6;
            this.colEarlyMinute.Width = 0x3b;
            this.repEarlyMinute.AutoHeight = false;
            this.repEarlyMinute.Buttons.AddRange(new EditorButton[] { new EditorButton(ButtonPredefines.Combo) });
            this.repEarlyMinute.EditValueChangedFiringMode = EditValueChangedFiringMode.Buffered;
            this.repEarlyMinute.Name = "repEarlyMinute";
            this.colIsOverTime.Caption = "Tăng ca";
            this.colIsOverTime.FieldName = "IsOverTime";
            this.colIsOverTime.Name = "colIsOverTime";
            this.colIsWork.Caption = "C\x00f3 l\x00e0m";
            this.colIsWork.FieldName = "IsWork";
            this.colIsWork.Name = "colIsWork";
            this.colSorted.Caption = "Thứ tự";
            this.colSorted.FieldName = "Sorted";
            this.colSorted.Name = "colSorted";
            this.colDescription.Caption = "Ghi ch\x00fa";
            this.colDescription.FieldName = "Description";
            this.colDescription.Name = "colDescription";
            this.splitContainerControl1.Dock = DockStyle.Fill;
            this.splitContainerControl1.Location = new Point(0, 0);
            this.splitContainerControl1.Name = "splitContainerControl1";
            this.splitContainerControl1.Panel1.Controls.Add(this.xucListEmployee1);
            this.splitContainerControl1.Panel1.Text = "Panel1";
            this.splitContainerControl1.Panel2.Controls.Add(this.gcList);
            this.splitContainerControl1.Panel2.Controls.Add(this.panelControl1);
            this.splitContainerControl1.Panel2.Text = "Panel2";
            this.splitContainerControl1.Size = new Size(0x381, 0x249);
            this.splitContainerControl1.SplitterPosition = 0xf3;
            this.splitContainerControl1.TabIndex = 8;
            this.splitContainerControl1.Text = "splitContainerControl1";
            this.splitContainerControl1.SplitterPositionChanged += new EventHandler(this.splitContainerControl1_SplitterPositionChanged);
            this.xucListEmployee1.Dock = DockStyle.Fill;
            this.xucListEmployee1.Location = new Point(0, 0);
            this.xucListEmployee1.Name = "xucListEmployee1";
            this.xucListEmployee1.Size = new Size(0xf3, 0x249);
            this.xucListEmployee1.TabIndex = 0;
            this.panelControl1.Controls.Add(this.txtEmployeeCode);
            this.panelControl1.Controls.Add(this.txtEmployeeName);
            this.panelControl1.Controls.Add(this.flowLayoutPanel1);
            this.panelControl1.Controls.Add(this.imgPhoto);
            this.panelControl1.Controls.Add(this.flowLayoutPanel2);
            this.panelControl1.Dock = DockStyle.Top;
            this.panelControl1.Location = new Point(0, 0);
            this.panelControl1.Name = "panelControl1";
            this.panelControl1.Size = new Size(0x288, 0x2f);
            this.panelControl1.TabIndex = 5;
            this.panelControl1.Paint += new PaintEventHandler(this.panelControl1_Paint);
            this.txtEmployeeCode.Location = new Point(0x3d, 0x1b);
            this.txtEmployeeCode.Name = "txtEmployeeCode";
            this.txtEmployeeCode.Size = new Size(0x47, 13);
            this.txtEmployeeCode.TabIndex = 2;
            this.txtEmployeeCode.Text = "EmployeeCode";
            this.txtEmployeeName.Appearance.Font = new Font("Tahoma", 8.25f, FontStyle.Bold);
            this.txtEmployeeName.Appearance.Options.UseFont = true;
            this.txtEmployeeName.Location = new Point(60, 6);
            this.txtEmployeeName.Name = "txtEmployeeName";
            this.txtEmployeeName.Size = new Size(0x57, 13);
            this.txtEmployeeName.TabIndex = 1;
            this.txtEmployeeName.Text = "EmployeeName";
            this.flowLayoutPanel1.Anchor = AnchorStyles.Right | AnchorStyles.Top;
            this.flowLayoutPanel1.BackColor = Color.Transparent;
            this.flowLayoutPanel1.Controls.Add(this.lbOverTimeHour);
            this.flowLayoutPanel1.Controls.Add(this.labelControl15);
            this.flowLayoutPanel1.Controls.Add(this.lbTotalHour);
            this.flowLayoutPanel1.Controls.Add(this.labelControl16);
            this.flowLayoutPanel1.Controls.Add(this.ptLock);
            this.flowLayoutPanel1.Controls.Add(this.ptFinish);
            this.flowLayoutPanel1.FlowDirection = FlowDirection.RightToLeft;
            this.flowLayoutPanel1.Location = new Point(0x126, 3);
            this.flowLayoutPanel1.Name = "flowLayoutPanel1";
            this.flowLayoutPanel1.Size = new Size(0x15b, 0x13);
            this.flowLayoutPanel1.TabIndex = 5;
            this.lbOverTimeHour.Appearance.Font = new Font("Tahoma", 8.25f, FontStyle.Bold);
            this.lbOverTimeHour.Appearance.ForeColor = Color.MediumBlue;
            this.lbOverTimeHour.Appearance.Options.UseFont = true;
            this.lbOverTimeHour.Appearance.Options.UseForeColor = true;
            this.lbOverTimeHour.Location = new Point(0x151, 3);
            this.lbOverTimeHour.Name = "lbOverTimeHour";
            this.lbOverTimeHour.Size = new Size(7, 13);
            this.lbOverTimeHour.TabIndex = 6;
            this.lbOverTimeHour.Text = "0";
            this.labelControl15.Anchor = AnchorStyles.Right | AnchorStyles.Top;
            this.labelControl15.Appearance.Font = new Font("Tahoma", 8.25f, FontStyle.Bold);
            this.labelControl15.Appearance.Options.UseFont = true;
            this.labelControl15.Location = new Point(0x100, 3);
            this.labelControl15.Name = "labelControl15";
            this.labelControl15.Size = new Size(0x4b, 13);
            this.labelControl15.TabIndex = 5;
            this.labelControl15.Text = "/ Giờ tăng ca:";
            this.lbTotalHour.Appearance.Font = new Font("Tahoma", 8.25f, FontStyle.Bold);
            this.lbTotalHour.Appearance.ForeColor = Color.MediumBlue;
            this.lbTotalHour.Appearance.Options.UseFont = true;
            this.lbTotalHour.Appearance.Options.UseForeColor = true;
            this.lbTotalHour.Location = new Point(0xf3, 3);
            this.lbTotalHour.Name = "lbTotalHour";
            this.lbTotalHour.Size = new Size(7, 13);
            this.lbTotalHour.TabIndex = 4;
            this.lbTotalHour.Text = "0";
            this.labelControl16.Anchor = AnchorStyles.Right | AnchorStyles.Top;
            this.labelControl16.Appearance.Font = new Font("Tahoma", 8.25f, FontStyle.Bold);
            this.labelControl16.Appearance.Options.UseFont = true;
            this.labelControl16.Location = new Point(170, 3);
            this.labelControl16.Margin = new Padding(10, 3, 3, 3);
            this.labelControl16.Name = "labelControl16";
            this.labelControl16.Size = new Size(0x43, 13);
            this.labelControl16.TabIndex = 3;
            this.labelControl16.Text = "Số giờ c\x00f4ng:";
            this.ptLock.Image = MsgResc.lock_open__1_;
            this.ptLock.Location = new Point(0x90, 0);
            this.ptLock.Margin = new Padding(4, 0, 0, 0);
            this.ptLock.Name = "ptLock";
            this.ptLock.Size = new Size(0x10, 0x10);
            this.ptLock.TabIndex = 8;
            this.ptLock.TabStop = false;
            this.ptLock.Visible = false;
            this.ptFinish.Image = MsgResc.check;
            this.ptFinish.Location = new Point(0x7c, 0);
            this.ptFinish.Margin = new Padding(0);
            this.ptFinish.Name = "ptFinish";
            this.ptFinish.Size = new Size(0x10, 0x10);
            this.ptFinish.TabIndex = 9;
            this.ptFinish.TabStop = false;
            this.ptFinish.Visible = false;
            this.imgPhoto.Location = new Point(6, 4);
            this.imgPhoto.MenuManager = this.barManager1;
            this.imgPhoto.Name = "imgPhoto";
            this.imgPhoto.Properties.NullText = "[Chưa c\x00f3 h\x00ecnh]";
            this.imgPhoto.Properties.SizeMode = PictureSizeMode.Zoom;
            this.imgPhoto.Size = new Size(0x30, 0x27);
            this.imgPhoto.TabIndex = 0;
            this.flowLayoutPanel2.Anchor = AnchorStyles.Right | AnchorStyles.Top;
            this.flowLayoutPanel2.BackColor = Color.Transparent;
            this.flowLayoutPanel2.Controls.Add(this.lbEarlyMinute);
            this.flowLayoutPanel2.Controls.Add(this.labelControl20);
            this.flowLayoutPanel2.Controls.Add(this.lbLateMinute);
            this.flowLayoutPanel2.Controls.Add(this.labelControl17);
            this.flowLayoutPanel2.FlowDirection = FlowDirection.RightToLeft;
            this.flowLayoutPanel2.Location = new Point(0x10f, 0x18);
            this.flowLayoutPanel2.Name = "flowLayoutPanel2";
            this.flowLayoutPanel2.Size = new Size(370, 0x13);
            this.flowLayoutPanel2.TabIndex = 7;
            this.lbEarlyMinute.Appearance.Font = new Font("Tahoma", 8.25f, FontStyle.Bold);
            this.lbEarlyMinute.Appearance.ForeColor = Color.MediumBlue;
            this.lbEarlyMinute.Appearance.Options.UseFont = true;
            this.lbEarlyMinute.Appearance.Options.UseForeColor = true;
            this.lbEarlyMinute.Location = new Point(360, 3);
            this.lbEarlyMinute.Name = "lbEarlyMinute";
            this.lbEarlyMinute.Size = new Size(7, 13);
            this.lbEarlyMinute.TabIndex = 6;
            this.lbEarlyMinute.Text = "0";
            this.labelControl20.Anchor = AnchorStyles.Right | AnchorStyles.Top;
            this.labelControl20.Location = new Point(0xf3, 3);
            this.labelControl20.Name = "labelControl20";
            this.labelControl20.Size = new Size(0x6f, 13);
            this.labelControl20.TabIndex = 5;
            this.labelControl20.Text = "/ Tổng số ph\x00fat về sớm:";
            this.lbLateMinute.Appearance.Font = new Font("Tahoma", 8.25f, FontStyle.Bold);
            this.lbLateMinute.Appearance.ForeColor = Color.MediumBlue;
            this.lbLateMinute.Appearance.Options.UseFont = true;
            this.lbLateMinute.Appearance.Options.UseForeColor = true;
            this.lbLateMinute.Location = new Point(230, 3);
            this.lbLateMinute.Name = "lbLateMinute";
            this.lbLateMinute.Size = new Size(7, 13);
            this.lbLateMinute.TabIndex = 4;
            this.lbLateMinute.Text = "0";
            this.labelControl17.Anchor = AnchorStyles.Right | AnchorStyles.Top;
            this.labelControl17.Location = new Point(0x81, 3);
            this.labelControl17.Name = "labelControl17";
            this.labelControl17.Size = new Size(0x5f, 13);
            this.labelControl17.TabIndex = 3;
            this.labelControl17.Text = "Tổng số ph\x00fat đi trể:";
            this.pnInformation.Appearance.BackColor = Color.Transparent;
            this.pnInformation.Appearance.Options.UseBackColor = true;
            this.pnInformation.BorderStyle = BorderStyles.NoBorder;
            this.pnInformation.Controls.Add(this.lblState);
            this.pnInformation.Controls.Add(this.ptFail);
            this.pnInformation.Dock = DockStyle.Top;
            this.pnInformation.Location = new Point(0, 0x1a);
            this.pnInformation.Name = "pnInformation";
            this.pnInformation.Size = new Size(0x49f, 0x20);
            this.pnInformation.TabIndex = 6;
            this.pnInformation.Visible = false;
            this.pnInformation.Paint += new PaintEventHandler(this.pnInformation_Paint);
            this.lblState.AutoSize = true;
            this.lblState.BackColor = Color.Transparent;
            this.lblState.Font = new Font("Tahoma", 9f);
            this.lblState.ForeColor = Color.Red;
            this.lblState.Location = new Point(0x27, 8);
            this.lblState.Name = "lblState";
            this.lblState.Size = new Size(0x277, 14);
            this.lblState.TabIndex = 0x11;
            this.lblState.Text = "(*) Kh\x00f4ng t\x00ecm thấy dữ liệu chấm c\x00f4ng của th\x00e1ng n\x00e0y. Để c\x00f3 dữ liệu chấm c\x00f4ng vui l\x00f2ng tạo dữ liệu xếp ca trước!";
            this.ptFail.BackColor = Color.Transparent;
            this.ptFail.Image = MsgResc.orca;
            this.ptFail.Location = new Point(4, 0);
            this.ptFail.Name = "ptFail";
            this.ptFail.Size = new Size(0x20, 0x20);
            this.ptFail.SizeMode = PictureBoxSizeMode.AutoSize;
            this.ptFail.TabIndex = 0x10;
            this.ptFail.TabStop = false;
            this.splitContainerControl2.Dock = DockStyle.Fill;
            this.splitContainerControl2.Location = new Point(0, 0x3a);
            this.splitContainerControl2.Name = "splitContainerControl2";
            this.splitContainerControl2.Panel1.Controls.Add(this.xucOrganization1);
            this.splitContainerControl2.Panel1.Text = "Panel1";
            this.splitContainerControl2.Panel2.Controls.Add(this.splitContainerControl1);
            this.splitContainerControl2.Panel2.Text = "Panel2";
            this.splitContainerControl2.Size = new Size(0x49f, 0x249);
            this.splitContainerControl2.SplitterPosition = 280;
            this.splitContainerControl2.TabIndex = 11;
            this.splitContainerControl2.Text = "splitContainerControl2";
            this.splitContainerControl2.SplitterPositionChanged += new EventHandler(this.splitContainerControl1_SplitterPositionChanged);
            this.popupMenu1.LinksPersistInfo.AddRange(new LinkPersistInfo[] { new LinkPersistInfo(this.bbiTimekeepingBreak), new LinkPersistInfo(this.bbiTimekeepingExtra, true), new LinkPersistInfo(this.bbiTimekeepingPrivate) });
            this.popupMenu1.Manager = this.barManager1;
            this.popupMenu1.Name = "popupMenu1";
            base.AutoScaleDimensions = new SizeF(6f, 13f);
            base.AutoScaleMode = AutoScaleMode.Font;
            base.Controls.Add(this.splitContainerControl2);
            base.Controls.Add(this.pnInformation);
            base.Controls.Add(this.hideContainerBottom);
            base.Controls.Add(this.barDockControlLeft);
            base.Controls.Add(this.barDockControlRight);
            base.Controls.Add(this.barDockControlBottom);
            base.Controls.Add(this.barDockControlTop);
            base.Name = "xucTimekeeping";
            base.Size = new Size(0x49f, 0x296);
            this.repLateMinute.EndInit();
            this.barManager1.EndInit();
            this.repMonth.EndInit();
            this.repYear.EndInit();
            this.repositoryItemTextEdit2.EndInit();
            this.dockManager1.EndInit();
            this.hideContainerBottom.ResumeLayout(false);
            this.dpFooter.ResumeLayout(false);
            this.imageCollection2.EndInit();
            this.gcList.EndInit();
            this.gbList.EndInit();
            this.repTimeIn.EndInit();
            this.repTimeOut.EndInit();
            this.repSymbol.EndInit();
            this.repSymbolView.EndInit();
            this.repEarlyMinute.EndInit();
            this.splitContainerControl1.EndInit();
            this.splitContainerControl1.ResumeLayout(false);
            this.panelControl1.EndInit();
            this.panelControl1.ResumeLayout(false);
            this.panelControl1.PerformLayout();
            this.flowLayoutPanel1.ResumeLayout(false);
            this.flowLayoutPanel1.PerformLayout();
            ((ISupportInitialize) this.ptLock).EndInit();
            ((ISupportInitialize) this.ptFinish).EndInit();
            this.imgPhoto.Properties.EndInit();
            this.flowLayoutPanel2.ResumeLayout(false);
            this.flowLayoutPanel2.PerformLayout();
            this.pnInformation.EndInit();
            this.pnInformation.ResumeLayout(false);
            this.pnInformation.PerformLayout();
            ((ISupportInitialize) this.ptFail).EndInit();
            this.splitContainerControl2.EndInit();
            this.splitContainerControl2.ResumeLayout(false);
            this.popupMenu1.EndInit();
            base.ResumeLayout(false);
        }

        private void InitInterface()
        {
            if (!(this.m_IsLock || this.m_IsFinish))
            {
                this.bbiLock.Enabled = true;
                this.ptLock.Visible = false;
                this.bbiOpen.Enabled = true;
                this.bbiFinish.Enabled = true;
                this.ptFinish.Visible = false;
                this.colTimeIn.OptionsColumn.ReadOnly = false;
                this.colTimeOut.OptionsColumn.ReadOnly = false;
                this.colSymbol.OptionsColumn.ReadOnly = false;
                this.colLateMinute.OptionsColumn.ReadOnly = false;
                this.colEarlyMinute.OptionsColumn.ReadOnly = false;
            }
            else if (!(!this.m_IsLock || this.m_IsFinish))
            {
                this.bbiLock.Enabled = false;
                this.ptLock.Visible = true;
                this.bbiOpen.Enabled = true;
                this.bbiFinish.Enabled = true;
                this.ptFinish.Visible = false;
                this.colTimeIn.OptionsColumn.ReadOnly = true;
                this.colTimeOut.OptionsColumn.ReadOnly = true;
                this.colSymbol.OptionsColumn.ReadOnly = true;
                this.colLateMinute.OptionsColumn.ReadOnly = true;
                this.colEarlyMinute.OptionsColumn.ReadOnly = true;
            }
            else if (!(this.m_IsLock || !this.m_IsFinish))
            {
                this.bbiLock.Enabled = true;
                this.ptLock.Visible = false;
                this.bbiOpen.Enabled = false;
                this.bbiFinish.Enabled = false;
                this.ptFinish.Visible = true;
                this.colTimeIn.OptionsColumn.ReadOnly = true;
                this.colTimeOut.OptionsColumn.ReadOnly = true;
                this.colSymbol.OptionsColumn.ReadOnly = true;
                this.colLateMinute.OptionsColumn.ReadOnly = true;
                this.colEarlyMinute.OptionsColumn.ReadOnly = true;
            }
            else if (this.m_IsLock && this.m_IsFinish)
            {
                this.bbiLock.Enabled = false;
                this.ptLock.Visible = true;
                this.bbiOpen.Enabled = false;
                this.bbiFinish.Enabled = false;
                this.ptFinish.Visible = true;
                this.colTimeIn.OptionsColumn.ReadOnly = true;
                this.colTimeOut.OptionsColumn.ReadOnly = true;
                this.colSymbol.OptionsColumn.ReadOnly = true;
                this.colLateMinute.OptionsColumn.ReadOnly = true;
                this.colEarlyMinute.OptionsColumn.ReadOnly = true;
            }
        }

        private void InitMultiLanguages()
        {
            this.bbeMonth.Caption = MultiLanguages.GetString("tbl_Timekeeping", "Month", this.bbeMonth.Caption);
            this.bbeYear.Caption = MultiLanguages.GetString("tbl_Timekeeping", "Year", this.bbeYear.Caption);
            this.bbiPrint.Caption = MultiLanguages.GetString("tbl_Timekeeping", "Print", this.bbiPrint.Caption);
            this.bbiExport.Caption = MultiLanguages.GetString("tbl_Timekeeping", "Export", this.bbiExport.Caption);
            this.bbiReload.Caption = MultiLanguages.GetString("tbl_Timekeeping", "Refresh", this.bbiReload.Caption);
            this.bbiClose.Caption = MultiLanguages.GetString("tbl_Timekeeping", "Close", this.bbiClose.Caption);
            this.bbeTimekeepingName.Caption = MultiLanguages.GetString("tbl_Timekeeping", "TimesheetsName", this.bbeTimekeepingName.Caption);
            this.bbiLock.Caption = MultiLanguages.GetString("tbl_Timekeeping", "Lock", this.bbiLock.Caption);
            this.bbiOpen.Caption = MultiLanguages.GetString("tbl_Timekeeping", "Open", this.bbiOpen.Caption);
            this.bbiFinish.Caption = MultiLanguages.GetString("tbl_Timekeeping", "Finish", this.bbiFinish.Caption);
            this.bbiSendMail.Caption = MultiLanguages.GetString("tbl_Timekeeping", "SendMail", this.bbiSendMail.Caption);
            this.colShiftName.Caption = MultiLanguages.GetString("tbl_Timekeeping", "Shifts", this.colShiftName.Caption);
            this.colTimeIn.Caption = MultiLanguages.GetString("tbl_Timekeeping", "BeginTime", this.colTimeIn.Caption);
            this.colTimeOut.Caption = MultiLanguages.GetString("tbl_Timekeeping", "EndTime", this.colTimeOut.Caption);
            this.colSymbol.Caption = MultiLanguages.GetString("tbl_Timekeeping", "Symbol", this.colSymbol.Caption);
            this.colHour.Caption = MultiLanguages.GetString("tbl_Timekeeping", "TotalHour", this.colHour.Caption);
            this.colLateMinute.Caption = MultiLanguages.GetString("tbl_Timekeeping", "Late", this.colLateMinute.Caption);
            this.colEarlyMinute.Caption = MultiLanguages.GetString("tbl_Timekeeping", "Early", this.colEarlyMinute.Caption);
        }

        private void LoadStyle()
        {
            try
            {
                DataSet set = new DataSet();
                set.ReadXml(Application.StartupPath + @"\LayoutControl\xucTimekeeping.xml");
                this.splitContainerControl1.SplitterPosition = int.Parse(set.Tables[0].Rows[0][0].ToString());
                this.splitContainerControl2.SplitterPosition = int.Parse(set.Tables[0].Rows[0][1].ToString());
                if (bool.Parse(set.Tables[0].Rows[0][2].ToString()))
                {
                    this.dpFooter.Visibility = DockVisibility.Visible;
                }
                else
                {
                    this.dpFooter.Visibility = DockVisibility.AutoHide;
                }
                this.dpFooter.Height = int.Parse(set.Tables[0].Rows[0][3].ToString());
            }
            catch
            {
                this.splitContainerControl1.SplitterPosition = 240;
                this.splitContainerControl2.SplitterPosition = 280;
                this.dpFooter.Visibility = DockVisibility.Visible;
                this.dpFooter.Height = 0x6c;
            }
        }

        private void LoadSymbol()
        {
            xucSymbolList list = new xucSymbolList();
            list.Init(false, false);
            list.Dock = DockStyle.Fill;
            this.dpFooter.Controls.Add(list);
            list.BringToFront();
        }

        public void LoadTimeKeeperTable()
        {
            this.bbeTimekeepingName.EditValue = "Th\x00e1ng " + this.m_Month.ToString() + "-" + this.m_Year.ToString();
            HRM_TIMEKEEPER_TABLELIST hrm_timekeeper_tablelist = new HRM_TIMEKEEPER_TABLELIST();
            if (!hrm_timekeeper_tablelist.Exist(this.m_Month, this.m_Year))
            {
                this.gcList.DataSource = null;
                this.pnInformation.Visible = true;
                this.RaiseUnShiftDataHandler(this.m_Month, this.m_Year);
            }
            else
            {
                this.pnInformation.Visible = false;
                hrm_timekeeper_tablelist.Get(this.m_Month, this.m_Year);
                this.m_TimeKeeperTableListID = hrm_timekeeper_tablelist.TimeKeeperTableListID;
                this.m_IsLock = hrm_timekeeper_tablelist.IsLock;
                this.m_IsFinish = hrm_timekeeper_tablelist.IsFinish;
                this.InitInterface();
                this.gcList.DataSource = new HRM_TIMEKEEPER().GetListByEmployee(this.m_EmployeeCode, this.m_Month, this.m_Year);
                this.gbList.SetRowExpanded(-System.DateTime.Now.Day, true);
                this.gbList.FocusedRowHandle = -System.DateTime.Now.Day;
                this.Sumary();
            }
        }

        private void panelControl1_Paint(object sender, PaintEventArgs e)
        {
        }

        private void pnInformation_Paint(object sender, PaintEventArgs e)
        {
        }

        private void RaiseClosedHandler()
        {
            if (this.Closed != null)
            {
                this.Closed(this);
            }
        }

        private void RaiseTimekeeperTableInsertedHander()
        {
            if (this.TimekeeperTableInserted != null)
            {
                this.TimekeeperTableInserted(this);
            }
        }

        private void RaiseUnShiftDataHandler(int Month, int Year)
        {
            if (this.UnShiftData != null)
            {
                this.UnShiftData(this, Month, Year);
            }
        }

        private void Reload()
        {
            System.DateTime dayFirstMonth = new System.DateTime(this.m_Year, this.m_Month, 1);
            System.DateTime dayEndMonth = new System.DateTime(this.m_Year, this.m_Month, System.DateTime.DaysInMonth(this.m_Year, this.m_Month));
            this.xucListEmployee1.LoadData(1, this.m_Level, this.m_Code, dayFirstMonth, dayEndMonth);
        }

        private void repEarlyMinute_EditValueChanged(object sender, EventArgs e)
        {
            this.m_LateMinute = Convert.ToInt32(this.gbList.GetFocusedRowCellValue(this.colLateMinute).ToString());
            HRM_TIMEKEEPER hrm_timekeeper = new HRM_TIMEKEEPER();
            hrm_timekeeper.Get(this.m_TimeKeeperTableListID, this.m_EmployeeCode, this.m_ShiftCodeOld, this.m_SymbolOld, this.m_DateOld, this.m_LateMinute, this.m_EarlyMinute);
            this.gbList.SetFocusedRowCellValue(this.colTimeIn, hrm_timekeeper.TimeIn);
            this.gbList.SetFocusedRowCellValue(this.colTimeOut, hrm_timekeeper.TimeOut);
            this.gbList.SetFocusedRowCellValue(this.colHour, hrm_timekeeper.Hour);
            this.gbList.SetFocusedRowCellValue(this.colDayHour, hrm_timekeeper.DayHour);
            this.gbList.SetFocusedRowCellValue(this.colNightHour, hrm_timekeeper.NightHour);
            this.gbList.SetFocusedRowCellValue(this.colLateMinute, hrm_timekeeper.LateMinute);
            this.gbList.SetFocusedRowCellValue(this.colEarlyMinute, hrm_timekeeper.EarlyMinute);
            this.UpdateTimeKeeper();
        }

        private void repEarlyMinute_EditValueChanging(object sender, ChangingEventArgs e)
        {
            try
            {
                this.m_EarlyMinute = Convert.ToInt32(e.NewValue.ToString());
            }
            catch
            {
                try
                {
                    this.m_EarlyMinute = Convert.ToInt32(e.NewValue.ToString().Remove(e.NewValue.ToString().Length - 1));
                }
                catch
                {
                }
            }
            if (this.m_EarlyMinute < 0)
            {
                this.m_EarlyMinute = 0;
            }
        }

        private void repLateMinute_EditValueChanged(object sender, EventArgs e)
        {
            this.m_EarlyMinute = Convert.ToInt32(this.gbList.GetFocusedRowCellValue(this.colEarlyMinute).ToString());
            HRM_TIMEKEEPER hrm_timekeeper = new HRM_TIMEKEEPER();
            hrm_timekeeper.Get(this.m_TimeKeeperTableListID, this.m_EmployeeCode, this.m_ShiftCodeOld, this.m_SymbolOld, this.m_DateOld, this.m_LateMinute, this.m_EarlyMinute);
            this.gbList.SetFocusedRowCellValue(this.colTimeIn, hrm_timekeeper.TimeIn);
            this.gbList.SetFocusedRowCellValue(this.colTimeOut, hrm_timekeeper.TimeOut);
            this.gbList.SetFocusedRowCellValue(this.colHour, hrm_timekeeper.Hour);
            this.gbList.SetFocusedRowCellValue(this.colDayHour, hrm_timekeeper.DayHour);
            this.gbList.SetFocusedRowCellValue(this.colNightHour, hrm_timekeeper.NightHour);
            this.gbList.SetFocusedRowCellValue(this.colLateMinute, hrm_timekeeper.LateMinute);
            this.gbList.SetFocusedRowCellValue(this.colEarlyMinute, hrm_timekeeper.EarlyMinute);
            this.UpdateTimeKeeper();
        }

        private void repLateMinute_EditValueChanging(object sender, ChangingEventArgs e)
        {
            try
            {
                this.m_LateMinute = Convert.ToInt32(e.NewValue.ToString());
            }
            catch
            {
                try
                {
                    this.m_LateMinute = Convert.ToInt32(e.NewValue.ToString().Remove(e.NewValue.ToString().Length - 1));
                }
                catch
                {
                }
            }
            if (this.m_LateMinute < 0)
            {
                this.m_LateMinute = 0;
            }
        }

        private void repMonth_EditValueChanged(object sender, EventArgs e)
        {
            this.Reload();
        }

        private void repMonth_EditValueChanging(object sender, ChangingEventArgs e)
        {
            this.m_Month = Convert.ToDateTime(e.NewValue.ToString()).Month;
        }

        private void repSymbol_EditValueChanged(object sender, EventArgs e)
        {
            HRM_TIMEKEEPER hrm_timekeeper = new HRM_TIMEKEEPER();
            hrm_timekeeper.Get(this.m_TimeKeeperTableListID, this.m_EmployeeCode, this.m_ShiftCodeOld, this.m_Symbol, this.m_DateOld, this.m_TimeInOld, this.m_TimeOutOld);
            this.gbList.SetFocusedRowCellValue(this.colTimeIn, hrm_timekeeper.TimeIn);
            this.gbList.SetFocusedRowCellValue(this.colTimeOut, hrm_timekeeper.TimeOut);
            this.gbList.SetFocusedRowCellValue(this.colHour, hrm_timekeeper.Hour);
            this.gbList.SetFocusedRowCellValue(this.colDayHour, hrm_timekeeper.DayHour);
            this.gbList.SetFocusedRowCellValue(this.colNightHour, hrm_timekeeper.NightHour);
            this.gbList.SetFocusedRowCellValue(this.colLateMinute, hrm_timekeeper.LateMinute);
            this.gbList.SetFocusedRowCellValue(this.colEarlyMinute, hrm_timekeeper.EarlyMinute);
            this.UpdateTimeKeeper();
        }

        private void repSymbol_EditValueChanging(object sender, ChangingEventArgs e)
        {
            this.m_Symbol = e.NewValue.ToString();
        }

        private void repSymbol_QueryPopUp(object sender, CancelEventArgs e)
        {
        }

        private void repTimeIn_EditValueChanged(object sender, EventArgs e)
        {
            HRM_TIMEKEEPER hrm_timekeeper = new HRM_TIMEKEEPER();
            hrm_timekeeper.Get(this.m_TimeKeeperTableListID, this.m_EmployeeCode, this.m_ShiftCodeOld, this.m_SymbolOld, this.m_DateOld, this.m_TimeIn, this.m_TimeOut);
            this.gbList.SetFocusedRowCellValue(this.colTimeIn, hrm_timekeeper.TimeIn);
            this.gbList.SetFocusedRowCellValue(this.colTimeOut, hrm_timekeeper.TimeOut);
            this.gbList.SetFocusedRowCellValue(this.colHour, hrm_timekeeper.Hour);
            this.gbList.SetFocusedRowCellValue(this.colDayHour, hrm_timekeeper.DayHour);
            this.gbList.SetFocusedRowCellValue(this.colNightHour, hrm_timekeeper.NightHour);
            this.gbList.SetFocusedRowCellValue(this.colLateMinute, hrm_timekeeper.LateMinute);
            this.gbList.SetFocusedRowCellValue(this.colEarlyMinute, hrm_timekeeper.EarlyMinute);
            this.UpdateTimeKeeper();
        }

        private void repTimeIn_EditValueChanging(object sender, ChangingEventArgs e)
        {
            try
            {
                this.m_TimeIn = Convert.ToDateTime(e.NewValue.ToString());
                this.m_TimeOut = Convert.ToDateTime(this.gbList.GetFocusedRowCellValue(this.colTimeOut).ToString());
            }
            catch
            {
            }
        }

        private void repTimeOut_EditValueChanged(object sender, EventArgs e)
        {
            HRM_TIMEKEEPER hrm_timekeeper = new HRM_TIMEKEEPER();
            hrm_timekeeper.Get(this.m_TimeKeeperTableListID, this.m_EmployeeCode, this.m_ShiftCodeOld, this.m_SymbolOld, this.m_DateOld, this.m_TimeIn, this.m_TimeOut);
            this.gbList.SetFocusedRowCellValue(this.colTimeIn, hrm_timekeeper.TimeIn);
            this.gbList.SetFocusedRowCellValue(this.colTimeOut, hrm_timekeeper.TimeOut);
            this.gbList.SetFocusedRowCellValue(this.colHour, hrm_timekeeper.Hour);
            this.gbList.SetFocusedRowCellValue(this.colDayHour, hrm_timekeeper.DayHour);
            this.gbList.SetFocusedRowCellValue(this.colNightHour, hrm_timekeeper.NightHour);
            this.gbList.SetFocusedRowCellValue(this.colLateMinute, hrm_timekeeper.LateMinute);
            this.gbList.SetFocusedRowCellValue(this.colEarlyMinute, hrm_timekeeper.EarlyMinute);
            this.UpdateTimeKeeper();
        }

        private void repTimeOut_EditValueChanging(object sender, ChangingEventArgs e)
        {
            try
            {
                this.m_TimeOut = Convert.ToDateTime(e.NewValue.ToString());
                this.m_TimeIn = Convert.ToDateTime(this.gbList.GetFocusedRowCellValue(this.colTimeIn).ToString());
            }
            catch
            {
            }
        }

        private void repYear_EditValueChanged(object sender, EventArgs e)
        {
            this.Reload();
        }

        private void repYear_EditValueChanging(object sender, ChangingEventArgs e)
        {
            this.m_Year = Convert.ToDateTime(e.NewValue.ToString()).Year;
        }

        private static void SaveStyle(int Position1, int Position2, bool ShowFooter, int HeightFooter)
        {
            DataSet set = new DataSet();
            using (DataTable table = new DataTable())
            {
                table.Columns.Add("SplitterPosition1", typeof(string));
                table.Columns.Add("SplitterPosition2", typeof(string));
                table.Columns.Add("ShowFooter", typeof(string));
                table.Columns.Add("HeightFooter", typeof(string));
                object[] objArray = new object[] { Position1.ToString(), Position2.ToString(), ShowFooter.ToString(), HeightFooter.ToString() };
                table.Rows.Add(new object[0]);
                table.Rows[0][0] = objArray[0];
                table.Rows[0][1] = objArray[1];
                table.Rows[0][2] = objArray[2];
                table.Rows[0][3] = objArray[3];
                set.Tables.Add(table);
            }
            try
            {
                set.WriteXml(Application.StartupPath + @"\LayoutControl\xucTimekeeping.xml");
            }
            catch
            {
            }
        }

        private void splitContainerControl1_SplitterPositionChanged(object sender, EventArgs e)
        {
            if (this.dpFooter.Visibility == DockVisibility.Visible)
            {
                SaveStyle(this.splitContainerControl1.SplitterPosition, this.splitContainerControl2.SplitterPosition, true, this.dpFooter.Height);
            }
            else
            {
                SaveStyle(this.splitContainerControl1.SplitterPosition, this.splitContainerControl2.SplitterPosition, false, this.dpFooter.Height);
            }
        }

        private void Sumary()
        {
            HRM_TIMEKEEPER hrm_timekeeper = new HRM_TIMEKEEPER();
            this.lbLateMinute.Text = this.colLateMinute.SummaryText;
            this.lbEarlyMinute.Text = this.colEarlyMinute.SummaryText;
            HRM_TIMEKEEPER_TOTAL hrm_timekeeper_total = new HRM_TIMEKEEPER_TOTAL();
            hrm_timekeeper_total.Get(this.m_TimeKeeperTableListID, this.m_EmployeeCode);
            this.lbTotalHour.Text = hrm_timekeeper_total.TotalHour.ToString() + " (giờ)";
            this.lbOverTimeHour.Text = hrm_timekeeper_total.OvertimeTotal.ToString() + " (giờ)";
        }

        private double UpdateHourByBreakHour(double Hour)
        {
            double num = 0.0;
            HRM_TIMEKEEPER_BREAK hrm_timekeeper_break = new HRM_TIMEKEEPER_BREAK();
            num = Hour - hrm_timekeeper_break.TotalBreakHour(this.m_TimeKeeperTableListID, this.m_EmployeeCode, this.m_ShiftCodeOld, this.m_DateOld);
            if (num < 0.0)
            {
                num = 0.0;
            }
            return num;
        }

        private void UpdateTimeKeeper()
        {
            try
            {
                this.m_Symbol = this.gbList.GetFocusedRowCellValue(this.colSymbol).ToString();
                this.m_TimeIn = Convert.ToDateTime(this.gbList.GetFocusedRowCellValue(this.colTimeIn).ToString());
                this.m_TimeOut = Convert.ToDateTime(this.gbList.GetFocusedRowCellValue(this.colTimeOut).ToString());
                this.m_Hour = Convert.ToDouble(this.gbList.GetFocusedRowCellValue(this.colHour).ToString());
                this.m_DayHour = Convert.ToDouble(this.gbList.GetFocusedRowCellValue(this.colDayHour).ToString());
                this.m_NightHour = Convert.ToDouble(this.gbList.GetFocusedRowCellValue(this.colNightHour).ToString());
                this.m_PrivateHour = Convert.ToDouble(this.gbList.GetFocusedRowCellValue(this.colPrivateHour).ToString());
                this.m_LateMinute = Convert.ToInt32(this.gbList.GetFocusedRowCellValue(this.colLateMinute).ToString());
                this.m_EarlyMinute = Convert.ToInt32(this.gbList.GetFocusedRowCellValue(this.colEarlyMinute).ToString());
                this.m_IsOverTime = Convert.ToBoolean(this.gbList.GetFocusedRowCellValue(this.colIsOverTime).ToString());
                this.m_IsWork = Convert.ToBoolean(this.gbList.GetFocusedRowCellValue(this.colIsWork).ToString());
                this.m_Sorted = Convert.ToInt32(this.gbList.GetFocusedRowCellValue(this.colSorted).ToString());
                this.m_Description = this.gbList.GetFocusedRowCellValue(this.colDescription).ToString();
                HRM_TIMEKEEPER hrm_timekeeper = new HRM_TIMEKEEPER();
                hrm_timekeeper.Delete(this.m_TimeKeeperTableListID, this.m_EmployeeCode, this.m_ShiftCodeOld, this.m_DateOld, this.m_SymbolOld);
                hrm_timekeeper.Update(this.m_TimeKeeperTableListID, this.m_EmployeeCode, this.m_ShiftCodeOld, this.m_DateOld, this.m_Symbol, this.m_TimeIn, this.m_TimeOut, this.m_Hour, this.m_DayHour, this.m_NightHour, this.m_PrivateHour, this.m_LateMinute, this.m_EarlyMinute, this.m_IsOverTime, this.m_IsWork, this.m_Sorted, this.m_Description);
                this.m_SymbolOld = this.m_Symbol;
                this.Sumary();
            }
            catch
            {
            }
        }

        private void xucListEmployee1_Clicked(object sender, string Value)
        {
            this.l_Employee.Get(Value);
            this.imgPhoto.Image = this.l_Employee.Photo;
            this.txtEmployeeName.Text = this.l_Employee.FirstName + " " + this.l_Employee.LastName;
            this.txtEmployeeCode.Text = this.m_EmployeeCode = this.l_Employee.EmployeeCode;
            this.LoadTimeKeeperTable();
        }

        private void xucTimekeeping_Load(object sender, EventArgs e)
        {
            this.LoadStyle();
            this.LoadSymbol();
            this.Init();
        }

        public delegate void ClosedHandler(object sender);

        public delegate void TimekeeperTableInsertedHandler(object sender);

        public delegate void UnShiftDataHandler(object sender, int Month, int Year);
    }
}

